@extends('layouts.app')

@section('content')
    <h1>编辑任务</h1>
    <form action="{{ route('tasks.update', $task) }}" method="POST">
        @csrf
        @method('PUT')
        <div>
            <label>标题：</label>
            <input type="text" name="title" value="{{ $task->title }}" required>
        </div>
        <div>
            <label>描述：</label>
            <textarea name="description">{{ $task->description }}</textarea>
        </div>
        <button type="submit">更新</button>
    </form>
    <a href="{{ route('tasks.index') }}">返回</a>
@endsection